home *** CD-ROM | disk | FTP | other *** search
- L_Welcome_MsgBox_Message_Text = "This script demonstrates DameWare Local Group using the Windows Scripting Host."
- L_Welcome_MsgBox_Title_Text = "DameWare Windows Scripting Host Sample"
-
- CrLf = chr(13) & chr(10)
- MyTab = chr(9)
-
- Call Welcome()
-
- Dim DCtl1, strMachine, strUserID
-
- Set DCtl1 = Wscript.CreateObject("DameWare.DLGroupCtl.1")
-
- strMachine = DCtl1.GetMachineName
- strUserID = DCtl1.GetCurrentUserID
-
- Ans = MsgBox ("Local Machine Name: " & strMachine & CrLf & _
- MyTab & "User Id: " & strUserID, _
- vbOKOnly + vbInformation, _
- L_Welcome_MsgBox_Title_Text )
-
- DCtl1.Machine = DCtl1.GetMachineName
- DCtl1.SetFirstGroup
-
- Dim strGroups
-
- While DCtl1.GroupGetNext <> 0
- strGroups = strGroups & DCtl1.Group & MyTab & DCtl1.Groupcomment & CrLf
- Wend
-
- MsgBox "All Local Groups: " & CrLf & CrLf & strGroups
-
- Set DCtl1 = Nothing
-
- Sub Welcome()
- Dim intDoIt
-
- intDoIt = MsgBox(L_Welcome_MsgBox_Message_Text, _
- vbOKCancel + vbInformation, _
- L_Welcome_MsgBox_Title_Text )
- If intDoIt = vbCancel Then
- WScript.Quit
- End If
- End Sub
-
-